<div class="interest_user">
    <h3>可能感兴趣的人或标签</h3>
    <?php foreach($this->sidebar_recommend_users_topics AS $key => $val) { ?>
    <?php if ($val['topic_id']) { ?>
      	<p class="add_ls">
        <a href="topic/<?php echo $val['url_token']; ?>" class="add_user_f" ><img class="user_msg" data-message="&uid=<?php echo $val['topic_id']; ?>&card=topic" src="<?php echo get_topic_pic_url('mid', $val['topic_pic']); ?>" alt="<?php echo $val['topic_title']; ?>" title="<?php echo $val['topic_title']; ?>"/></a>
		
        <a href="topic/<?php echo $val['url_token']; ?>" class="user_msg" data-message="&uid=<?php echo $val['topic_id']; ?>&card=topic"><span class="i_glotopic" ><?php echo cjk_substr($val['topic_title'], 0, 10, 'UTF-8', '...'); ?></span>
        <a onclick="focus_topic($(this), $(this).find('em'), <?php echo $val['topic_id']; ?>);" rel="添加关注" class="i_add_attention" href="javascript:;"><em>加关注</em></a> 
        <span class="add_gray"><?php if ($val['focus_users']['user_name']) { ?><a href="people/<?php echo $val['focus_users']['url_token']; ?>"  data-message="&uid=<?php echo $val['focus_users']['uid'];?>&card=user"><?php echo $val['focus_users']['user_name']; ?></a> 关注了该标签<?php } ?></span>  
       </p>
	<?php } else { ?>
		<p class="add_ls">
          	<a href="people/<?php echo $val['url_token']; ?>" class="add_user_f" ><img class="user_msg" data-message="&uid=<?php echo $val['uid'];?>&card=user" src="<?php echo get_avatar_url($val['uid'], 'min'); ?>" alt="<?php echo $val['user_name']; ?>" title="<?php echo $val['user_name']; ?>"/></a>
			
            <a href="people/<?php echo $val['url_token']; ?>" class="user_msg" data-message="&uid=<?php echo $val['uid'];?>&card=user"><?php echo $val['user_name']; ?> </a><a onclick="follow_people($(this), $(this).find('em'), <?php echo $val['uid'];?>);" rel="添加关注" class="i_add_attention" href="javascript:void(0);"><em>加关注</em></a> <span class="add_gray"><?php if ($val['rtype']['type'] == 'friend') { ?><a href="people/<?php echo $val['friend_users']['url_token']; ?>" ><?php echo $val['friend_users']['user_name'];?></a> 关注了 TA<?php } else if ($val['rtype']['type'] == 'topic') { ?>TA 也关注 <a href='topic/<?php echo $val['topic_info']['url_token']; ?>'><?php echo $val['topic_info']['topic_title'];?></a><?php } ?></span> </p>
	<?php } ?>
	<?php } ?>
</div>